#!/usr/bin/env python
# -*- coding: utf-8 -*-

import os
from .default import DefaultConfig


class TestingConfig(DefaultConfig):
    """测试环境配置"""
    
    TESTING = True
    DEBUG = True
    
    # 使用内存数据库进行测试
    SQLALCHEMY_DATABASE_URI = "sqlite:///:memory:"
    
    # 测试环境禁用CSRF保护
    WTF_CSRF_ENABLED = False
    
    # 测试环境JWT配置
    JWT_ACCESS_TOKEN_EXPIRES = 5  # 5秒，便于测试过期
    
    # 测试环境请求限流配置
    RATELIMIT_ENABLED = False 